Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prevent premature port disconnection #159

Merged
merged 1 commit into from
Oct 17, 2023
Merged

fix: prevent premature port disconnection #159

merged 1 commit into from
Oct 17, 2023

Conversation

ignatiusmb
Copy link
Member

No description provided.

@ignatiusmb ignatiusmb merged commit 37ffe98 into master Oct 17, 2023
1 check passed
@ignatiusmb ignatiusmb deleted the disconnect branch October 17, 2023 06:25
@ignatiusmb
Copy link
Member Author

Seems like we still need to prevent or handle port disconnection more gracefully, when the tab or extension isn't used for a while, the service worker goes offline/inactive and the extension becomes unusable as it tries to post a message but could not, along with the following error

Uncaught Error: Attempting to use a disconnected port object

We're able to "reset" the extension state when it is disconnected by attaching a listener from the onDisconnect property, but the 'reload' button would still not work because it's tries to send a message to reload the tab.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant